package com.education.user.feign;


import com.education.common.pojo.TStudent;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "welco-service")
public interface StudentClient {

    //查询学生信息
    @RequestMapping(value = "/app/tStudent/findByNameAndIdcardno", method = RequestMethod.GET)
    Map<String, Object> findByNameAndIdcardno(@RequestParam(value = "studentName", required = false) String studentName,
                                              @RequestParam(value = "idcardno", required = false) String idcardno,
                                              @RequestParam(value = "userId", required = false) Integer userId);

    /**
     * 修改学生信息
     *
     * @param tStudent
     * @return
     */
    @RequestMapping(value = "/app/tStudent/updateByStudentName", method = RequestMethod.POST)
    String updateByStudentName(@RequestBody TStudent tStudent);
}
